#nullable enable

using System;
using System.Collections.Generic;
using System.Threading.Tasks;

namespace PHMEE.EnergyEfficiency;

public interface IShaftPowerMeterTdRepository
{
    // /// <summary>
    // /// 查询 shaft_power_meter 指定时间范围内的最新一条数据，前闭后闭区间
    // /// </summary>
    // /// <param name="vesselId"></param>
    // /// <param name="startDateTime"></param>
    // /// <param name="endDateTime"></param>
    // /// <returns></returns>
    // Task<ShaftPowerMeterTde?> GetLatestOrDefaultByDateTimeCloseCloseAsync(Guid vesselId, DateTime startDateTime, DateTime endDateTime);

    /// <summary>
    /// 查询 shaft_power_meter 指定 endDateTime 时间前（含）的最新一条数据
    /// </summary>
    /// <param name="vesselId"></param>
    /// <param name="endDateTime"></param>
    /// <returns></returns>
    Task<ShaftPowerMeterTde?> GetLatestOrDefaultByDateTimeAsync(Guid vesselId, DateTime endDateTime);

    /// <summary>
    /// 查询 shaft_power_meter 指定时间范围内的数据，前闭后开区间
    /// </summary>
    /// <param name="vesselId"></param>
    /// <param name="startDateTime"></param>
    /// <param name="endDateTime"></param>
    /// <param name="skipCount"></param>
    /// <param name="maxResultCount"></param>
    /// <returns></returns>
    Task<(int totalCount, List<ShaftPowerMeterTde> shaftPowerMeterTdes)> GetListByDateTimeAsync(Guid vesselId, DateTime startDateTime, DateTime endDateTime,
        int skipCount, int maxResultCount);
}